package com.shangxia.dreaming.common.util.excelUtil;

import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.List;

/**
 * @ProjectName: dreaming
 * @ClassName: HeadFactory
 * @Time: 2020/10/5
 * @Author: zhouy
 * @Description:
 * @Experience:
 */

@Slf4j
public class HeadFactory {

    public static List<List<String>> head1(int size) {
        List<List<String>> list = new ArrayList<List<String>>();
        List<String> head01 = new ArrayList<String>();
        head01.add("期数");
        head01.add("期数");
        list.add(head01);
        for (int i = 0; i < 5 * size; i++) {
            List<String> head0 = new ArrayList<String>();
            head0.add(i / 5 + 1 + "");
            if (i % 5 == 0) {
                head0.add("位置");
            } else if (i % 5 == 1) {
                head0.add("年龄");
            } else if (i % 5 == 2) {
                head0.add("真号");
            } else if (i % 5 == 3) {
                head0.add("层数");
            } else {
                head0.add(" ");
            }
            list.add(head0);
        }
        return list;
    }

    public static List head2() {
        List<List<String>> list = new ArrayList<List<String>>();
        List<String> head01 = new ArrayList<String>();
        head01.add("年龄");
        List<String> head02 = new ArrayList<String>();
        head02.add("个数");
        List<String> head03 = new ArrayList<String>();
        head03.add("期数");
        list.add(head01);
        list.add(head02);
        list.add(head03);
        return list;
    }

    public static List head22() {
        List<List<String>> list = new ArrayList<List<String>>();
        List<String> head01 = new ArrayList<String>();
        head01.add("年龄");
        List<String> head02 = new ArrayList<String>();
        head02.add("个数");
        list.add(head01);
        list.add(head02);
        return list;
    }

    public static List<List<String>> head(Integer i, Integer sumCode) {
        List<List<String>> list = new ArrayList<List<String>>();
        for (int j = 0; j < sumCode; j++) {
            List<String> head0 = new ArrayList<String>();
            head0.add("第" + (i + 1) + "层 ");
            head0.add(j + "");
            list.add(head0);
        }
        return list;
    }
}